import { createRouter, createWebHashHistory } from 'vue-router'


const routes = [
  {
    path: '/',
    redirect : '/index/props',
    component: () => import('@/views/index.vue'),
    children: [
      {
        path : '/index/props',
        component : () => import('@/views/index/props.vue')
      },
      {
        path : '/index/provide',
        component : ()=> import('@/views/index/provide.vue')
      },
      {
        path : "/index/mitt",
        component : ()=> import('@/views/index/mitt.vue')
      },
      {
        path : '/index/slot',
        component : ()=> import('@/views/index/slot.vue')
      },
      {
        path : '/index/vuex',
        component : ()=> import('@/views/index/vuex.vue')
      },
      {
        path : '/index/expose',
        component : ()=> import('@/views/index/expose.vue')
      }
    ] 
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
